The “Weak Generics” Problem: Sources, Implications and Treatment

نویسنده

  • Stan Jarzabek
چکیده

Generic design aims at achieving non-redundancy for simplification reasons, by unifying similarity patterns at design and code levels, whenever there is an engineering benefit of doing so. The extent of non-accidental repetitions recurring similar structures in programs suggests that the potential of generic design may not be fully exploited. Poor design and ad hoc maintenance are the two often mentioned reasons why programmers multiply similar code structures (often termed as clones in literature). At times, cloning is done in a good cause, for example, to speed up development, increase program’s performance or improve its reliability. Still, much unresolved similarity remains in newly developed, well-designed programs. Often a symptom of failure to achieve genericity (therefore, term “weak generics”), such situations were of our prime interest in the work reported in this paper. In the paper, we present results from four empirical studies in which we found over 60% of code contained in similar program structures, recurring many times in programs. In some cases, problems occurred, as using conventional methods a suitable generic solution was either complicated or conflicted with other design goals that could not be compromised. In yet other cases, existing mechanisms were not sufficient to define suitable generic design solutions. We believe the problems that we observed are not isolated but affect many other programs. We propose to strengthen generic design by applying meta-level parameterization and generation on top of conventional programs. We discuss one technique to realize such a “mixed strategy” solution and trade-offs involved in employing meta-level techniques. The approach is practical as it complements, rather than competes with other programming paradigms, and can be gradually adopted, starting with conventional programs. It has been successfully applied in industrial projects.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Dutchmen are Good Sailors: Generics and Gradability∗

Many generics have quite strong interpretations. Ravens are black is naturally paraphrased as all normal ravens are black.. However, there is a sundry collection of weak generics, ones that can be true even though most members of the kind at issue do not conform to them, including Dutchmen are good sailors and lions have manes. This paper presents a new semantic theory for generics on which the...

متن کامل

A Comparison of the Metacognitive Knowledge of Weak and Strong Students in Problem Solving

This study sought to compare the metacognitive knowledge profile of weak and strong students in problem solving. For achieving this purpose, one hundred students of the second educational District of Tehran were chosen by cluster sampling. They responded individually to the questions of "the Metacognitive Questionnaire Interview" and in the next step their performance in the pendulum problem so...

متن کامل

A New Pharmaceutical Environment in Iran: Marketing Impacts

For nearly 25 years, Iranian Pharmaceutical market has been a closed and centrally controlled one. Although some initiatives have been introduced during the last decade, yet the system is characterized as a closed one and lacks real competition. The current situation of drug in Iran may be characterized as: Intense price control by the Drug Authority i.e. Ministry of Health Ban of d...

متن کامل

A New Pharmaceutical Environment in Iran: Marketing Impacts

For nearly 25 years, Iranian Pharmaceutical market has been a closed and centrally controlled one. Although some initiatives have been introduced during the last decade, yet the system is characterized as a closed one and lacks real competition. The current situation of drug in Iran may be characterized as: Intense price control by the Drug Authority i.e. Ministry of Health Ban of d...

متن کامل

High Stakes Require More Than Just Talk: What to Do About Corruption in Health Systems; Comment on “We Need to Talk About Corruption in Health Systems”

Reluctance to talk about corruption is an important barrier to action. Yet the stakes of not addressing corruption in the health sector are higher than ever. Corruption includes wrongdoing by individuals, but it is also a problem of weak institutions captured by political interests, and underfunded, unreliable administrative systems and healthcare delivery models. We ur...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005